<?php

$id = intval($_POST['id']);

$table = $config['page'];
$q = "update $table set deleted = 1 where id = $id";
$result = mysql_query($q);
if (!$result) {
	$result = 0;
} else {
	$result = 1;
}

$error = mysql_error();
if ($error) {
	$message = $error;
} else {
	$message = "Удалено";
}

mysql_query("update user set delete_count = (delete_count + 1) where ext_id = {$config['user_id']}");
redirect($message);
